import axios from "./index";
// 登录
export function userLogin(userinfo: object) {
  return axios.post("/user/login", userinfo);
}
// 注册
export function dofinishregister(userinfo: object) {
  return axios.post("user/dofinishregister", userinfo);
}
// 验证手机号码是否被注册
export function docheckphone(userinfo: object) {
  return axios.post("user/docheckphone", userinfo);
}
// 发送验证码
export function dosendmsgcode(userinfo: object) {
  return axios.post("user/dosendmsgcode", userinfo);
}
// 获取地址数据
export function getAddress(userId: object) {
  return axios.get("address/list", { params: userId });
}
// 调用添加地址接口
export function addAddress(data: object) {
  return axios.post("/address/add", data);
}
// 调用更新地址接口
export function updateAddress(data: any) {
  return axios.post("/address/update", data);
}
// 调用删除地址接口
export function deleteAddr(addressid: object) {
  return axios.post("/address/delete", addressid);
}
// 调用默认地址接口
export function defaultAddress(userid: string) {
  return axios.post("/address/defaultAddress", { userid });
}
